import enterpriseConfig from './config/enterprise'
import integralConfig from './config/integral'

export default {
    tabbar: {
        get_items (shop) {
            if (shop.type === 'enterprise') {
                return enterpriseConfig.tabbar.items;
            }
            else if (shop.type === 'integral') {
                return integralConfig.tabbar.items;
            }
        }
    },

    orderEdit: {
        get_submit_button(shop) {
            if (shop.type === 'enterprise') {
                return enterpriseConfig.orderEdit.submit_button;
            }
            else if (shop.type === 'integral') {
                return integralConfig.orderEdit.submit_button;
            }
        }
    },

    product: {
        get_submit_button(shop) {
            if (shop.type === 'enterprise') {
                return enterpriseConfig.product.submit_button;
            }
            else if (shop.type === 'integral') {
                return integralConfig.product.submit_button;
            }
        }
    },

    shoppingCart: {
        get_submit_button(shop) {
            if (shop.type === 'enterprise') {
                return enterpriseConfig.shoppingCart.submit_button;
            }
            else if (shop.type === 'integral') {
                return integralConfig.shoppingCart.submit_button;
            }
        }
    },

    get_price_type (shop) {
        if (shop.type === 'enterprise') {
            return enterpriseConfig.price_type;
        }
        else if (shop.type === 'integral') {
            return integralConfig.price_type;
        }
    },

    get_index (shop) {
        if (shop.type === 'enterprise') {
            return enterpriseConfig.index;
        }
        else if (shop.type === 'integral') {
            return integralConfig.index;
        }
    }
}
